﻿/*
 * XtcpStream.h
 *
 */
#ifndef __GDK_XTCPSTREAM_H__
#define __GDK_XTCPSTREAM_H__

#include <gdk/core/Types.h>
#include <gdk/core/IO.h>
#include <gdk/net/XtcpConnection.h>



namespace gdk
{


	class GDK_NET_EXPORT XtcpStream : public XtcpConnection, public IO
	{
		DECLARE_CLASS_HANDLE(XtcpStream)
		DECLARE_CLASS_INSTANCE(XtcpStream)

	protected:
		XtcpStream(void);
		~XtcpStream(void);

	public:
		virtual ssize_t available(void) const;
		virtual ssize_t peek(void *buf, ssize_t size) const;
		virtual ssize_t read(void *buf, ssize_t size);
		virtual ssize_t write(const void *data, ssize_t size);
	};


}//namespace gdk



#endif /*__GDK_XTCPSTREAM_H__*/
